API Documentation
Entity.h
1 // Entity.h
3 //
5 
6 namespace nkGraphics
7 {
14  class DLL_GRAPHICS_EXPORT Entity final : public nkExport::Exportable
15  {
16  public :
17 
18  // Getters
22  Node* getParentNode () const ;
26  Shader* getShader () const ;
35 
36  // Setters
44  void setParentNode (Node* parent) ;
50  void setShader (Shader* shade) ;
56  void setRaytracingShader (Shader* shade) ;
57 
58  // Utilities
63  bool isCompatibleWith (Shader* shade) const ;
70  void updateBasicShader (SubEntity* caller) ;
77  Mesh* getMesh (int index) const ;
78 
79  // SubEnt maanagement
88  SubEntity* getChild (unsigned int index) const ;
92  int getChildCount () ;
96  const std::vector<SubEntity*>& getChildren () const ;
102  void removeChild (unsigned int index) ;
110  void updateMeshBinding (SubEntity* caller, Mesh* oldMesh) ;
111 
112  // Import / Export
118  virtual void exportClassToTree (nkExport::Node* rootNode) override ;
124  virtual void importClassFromTree (nkExport::Node* rootNode) override ;
125  } ;
126 }
nkGraphics::Entity::updateMeshBinding
void updateMeshBinding(SubEntity *caller, Mesh *oldMesh)
nkGraphics::Entity::addChild
SubEntity * addChild()
nkGraphics::Entity::getChildCount
int getChildCount()
nkGraphics::Entity::getChild
SubEntity * getChild(unsigned int index) const
nkGraphics::Entity::getRaytracingShader
Shader * getRaytracingShader() const
nkExport::Exportable
An interface to define objects that can be exported using this component.
Definition: Exportable.h:15
nkGraphics::RenderQueue
A render queue, where all items that have to be rendered are queued.
Definition: RenderQueue.h:15
nkGraphics::Entity::getShader
Shader * getShader() const
nkGraphics::Entity::updateBasicShader
void updateBasicShader(SubEntity *caller)
nkGraphics::Entity::importClassFromTree
virtual void importClassFromTree(nkExport::Node *rootNode) override
nkGraphics::Shader
A shader class, feeding data to a Program.
Definition: Shader.h:14
nkGraphics::Entity::exportClassToTree
virtual void exportClassToTree(nkExport::Node *rootNode) override
nkGraphics::Entity::getMesh
Mesh * getMesh(int index) const
nkGraphics::Entity
An entity in a render queue. It drives the shader and possible graph position for a set of renderable...
Definition: Entity.h:15
nkGraphics::Entity::removeChild
void removeChild(unsigned int index)
nkExport::Node
A node in the tree structure representing the data to export / import.
Definition: Node.h:42
nkGraphics::Entity::setRaytracingShader
void setRaytracingShader(Shader *shade)
nkGraphics::Entity::getRenderQueue
RenderQueue * getRenderQueue() const
nkGraphics::Entity::isCompatibleWith
bool isCompatibleWith(Shader *shade) const
nkGraphics::Entity::setShader
void setShader(Shader *shade)
nkGraphics::Entity::getChildren
const std::vector< SubEntity * > & getChildren() const
nkGraphics::Entity::getParentNode
Node * getParentNode() const
nkGraphics::SubEntity
Holds information about a sub entity, a renderable exposing the geometry.
Definition: SubEntity.h:12
nkGraphics::Node
Represents a node in a scene graph.
Definition: Node.h:14
nkGraphics
Encompasses all API of component NilkinsGraphics.
Definition: BoundingBox.h:7
nkGraphics::Mesh
Holds information about a mesh. Used as a basis to render 3d models.
Definition: Mesh.h:14
nkGraphics::Entity::setParentNode
void setParentNode(Node *parent)